#define _CRT_SECURE_NO_WARNINGS 1
#include <stdio.h>
int main()
{
    int i, j, k;
    int a[6][6];
    for (i = 0; i < 6; i++) {
        a[i][i] = a[i][0] = 1;
        for (j = 1; j < i; j++) {
            a[i][j] = a[i - 1][j - 1] + a[i - 1][j];
        }
    }
    for (i = 0; i < 6; i++) {
        for (k = 6 - i - 1; k >= 1; k--) {
            printf(" ");
        }
        for (j = 0; j <= i; j++) {
            printf("%4d", a[i][j]);
        }
        printf("\n");
    }
    return 0;
}
